package com.lyf.design.learn.designmodel.observer.test;

/**
 * @AUTHOR LYF
 * @DATE 2022/6/10
 * @VERSION 1.0
 * @DESC
 */
public class Main {
    public static void main(String[] args) {
        Observer observer = new Observer1();
        observer.setName("hh");
        Observer observer1 = new Observer1();
        observer1.setName("ll");// protected则就直接..
        Subject subject = new Subject1();


        subject.addObserver(observer);
        subject.addObserver(observer1);

        subject.change();
    }
}
